﻿<meta http-equiv="X-UA-Compatible" content="IE=10" />
<meta content="text/html; charset=UTF-8; X-Content-Type-Options=nosniff" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="css/smartstream.css" xmlns="http://www.w3.org/1999/html">

<script src="js/app.api.js"></script>
<script src="js/stream.api.js"></script></head>
<script src="js/WorkflowactionScript.js"></script>


<div id="smartsteam_panel" class="wp_fz_12" style="color: #595959">
    <div id="smartsteamTpl" class="smartsteamTpl">
        <div class="ss_row">
            <div class="ss_header" id="ss_panel_top">
                Smart Stream
                <i id="ss_panel_top_resize" class="main_common_i_11_11 right wp_mr_3 wp_mt_2 documents_click_able"></i>
            </div>
        </div>
        <div class="ss_wrap ">
            <div class="ss_row wp_mt_10">
                <ul class="filterMenu wp_ml_8 left wp_mt_2" id="filterMenu">
                    <li>
                        <span id="filterMenu_selected">Filter Posts</span>
                        <ul id="filterMenu_list"></ul>
                    </li>
                </ul>
                <i title="Search" id="ss_search_button" class="main_common_j_11_11 right wp_mt_5 wp_ml_20 smartsteam_clickable" onclick="smartstream.onSearchClicked();"></i>
                <button id="ss_menubar_share_btn" type="button" class="k-button wp_w_45 wp_h_18 wp_fz_11 right" onclick="smartstream.onShareButtonClicked();">Share</button>
                <span id="ss_menubar_time_btn" style="display: none;" class="right wp_mt_3 wp_mr_20 wp_fz_12 smartsteam_clickable" onclick="smartstream.onOrderTimeClicked();">Last Modified Time<i id="ss_order_time_down" class="main_icon_f_6_8 wp_ml_3 wp_mt_3" style="display: none;"></i><i id="ss_order_time_up" class="main_icon_e_6_8 wp_ml_3 wp_mt_3"></i></span>
            </div>
            <div id="ss_trend_news" style="display: none;">
                <div class="left wp_w_100 wp_mt_15">Trending News</div>
                    <marquee align="left" behavior="scroll" direction="left" height="60" width="600" hspace="50" vspace="20" loop="-1" scrollamount="5" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()" style="display: none;">
                        <ul class="left wp_w_1000">
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Earthquake at Japan</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Isael strikes house of</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">US defends Kerry from</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Israel criticism</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">United Nations</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Nuclear treaty</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Voting Rights</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Nuclear treaty</li>
                            <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Global growth</li>
                        </ul>
                    </marquee>
                    <ul class="left wp_w_620 wp_mt_15">
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Earthquake at Japan</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Isael strikes house of</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">US defends Kerry from</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Israel criticism</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">United Nations</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Nuclear treaty</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Voting Rights</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Nuclear treaty</li>
                        <li class="ss_trend_news" onclick="smartstream.onTrendNewsTabClicked(this);">Global growth</li>
                    </ul>
            </div>
        </div>
        <div id="ss_view">
            <div class="ss_body" id="smartstream_min_view"></div>
            <div class="ss_body" id="ss_body_search">           
				<div class="wp_w_768 wp_h_30 wp_ml_12">
					<span class="left wp_ml_17 wp_mr_5 wp_fz_11 wp_mt_3">Keywords  </span>
						<span class="k-textbox wp_searchbar">            
							<input id="ss_search_keywords_input" maxlength=2000  onkeyup="if (event.keyCode == 13) {smartstream.doSearch();}" type="text">
							<i class="k-icon k-i-search" title="Search" onclick="smartstream.doSearch();">&nbsp;</i>
						</span>
					</span></span>
				</div>
				<hr class="apps_tools_hr wp_w_768 wp_mt_9 wp_mb_10 left">
                <div id="ss_body_search_result_container" class="wp_w_768 wp_h_20 wp_mt_10 wp_mb-10">
                    <p class="wp_mb_10">
                        <span style="color:#4BB3FC" class="wp_h_20 wp_ml_25 smartsteam_clickable" onclick="smartstream.onBackToAllClicked();">Back to all</span>
                        <span id="ss_body_search_count">0 Result(s) for </span>
                    </p>
                    <div id="ss_body_search_results"></div>
                </div>
            </div>
            <div class="ss_body" id="smartstream_max_view"></div>
        </div>
    </div>
</div>

<!-- min template -->
<script id="smartstream_rowTmpl" type="text/x-kendo-template">
        <div class="ss_wrap" id="min_#:data.NotificationId#">
            <div class="ss_row wp_mb_10">
                <div class="left pic">
                    #if (data.EntityType.toLowerCase() == 'update') {#
                    <img style="height: 20px;width: 20px;" src="imgs/icons/main_documents_g_20_20.png" >
                    #}else{#
                    <img style="height: 20px;width: 20px;;" src="#:data.EntityImageUrl#"  onerror="smartstream.default(this)" >
                    #}#
                </div>
                <div class="right desc">
                    <div class="ss_title wp_mb_5 wp_h_17" title="#:data.NotificationTitle#">
                    <a id="ss_min_btn_title_#:data.NotificationId#" style="color: \#000000"
                        #if (!data.IsdetailPageLink || !data.EntityLinkUrl || data.EntityLinkUrl.toLowerCase() == 'null') {#
                        href="javascript:smartstream.showDetailWindow('smartstream','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','#:data.CreatedDate#','')">
                        #}else{#
                        href="javascript:smartstream.showDetailWindowWithURL('smartstream','#:data.EntityLinkUrl#','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','#:data.CreatedDate#','')">
                        #}#
                    #:data.NotificationTitle#</a>
                    </div>
                    <div class="left toName">
					
					
					
                    <img id="ss_min_to_img_#:data.NotificationId#" class="smartsteam_clickable" style="width: 15px;height: 15px;float: left;margin-right: 5px;" src="#: data.ToImageUrl #"
						# if(data.NotificationType == 'U'){ #
						onerror="smartstream.toSingleImg(this)"
						# }else{#
						onerror="smartstream.toMultiImg(this)"
						#}#
						# if(data.NotificationType == 'U'){ #
						onclick="homepageProfileWin.user_info_win_create('#:data.ToId#')">
						# }else{#
						onclick='javascript:community_profile_controller.initProfilePage(#:data.CommunityId#);'>
						#}#
					 <p id="ss_min_to_user_#:data.NotificationId#" style="max-width: 135px; width: auto;" class="text-overflow smartsteam_clickable" title="#: data.ToName #"
						# if(data.NotificationType == 'U'){ #
						onclick="homepageProfileWin.user_info_win_create('#:data.ToId#')">
						# }else{#
						onclick='javascript:community_profile_controller.initProfilePage(#:data.CommunityId#);'>
						#}#
						#: data.ToName #</p>
                    </div>
					
					
                    <div class="right toTime" id="smartstream_min_timestamp_#:data.NotificationId#">
                        #: Workport.utils.calDays(data.ServerDate,data.LastModifiedDate) #
                    </div>
                </div>
            </div>
        </div>
        <div class="ss_row ss_line" id="min_#:data.NotificationId#_line"></div>
</script>

<!-- max template -->
 <script id="smartstream_maxTmpl" type="text/x-kendo-template">
    <div class="ss_wrap ss_max" id="max_#:data.NotificationId#">
        <div class="left pic">
            #if (data.EntityType != null && data.EntityType.toLowerCase() == 'update') {#
            <img id="ss_max_btn_left_img#:data.NotificationId#" style="margin-top: 2px;" src="imgs/icons/main_documents_g_20_20.png" >
            #}else{#
            <img id="ss_max_btn_left_img#:data.NotificationId#" style="height: 20px;width: 20px;margin-top: 2px;" src="#:data.EntityImageUrl#"  onerror="smartstream.default(this)" >
            #}#
        </div>
        <div class="right desc">
            <div class="ss_title">
            <p style="margin-bottom: 8px;" class="text-overflow">
                <a id="ss_max_btn_title_#:data.NotificationId#" title="#:data.NotificationTitle#" style="font-size: 14px; color: \#000000"
                #if (!data.IsdetailPageLink || !data.EntityLinkUrl || data.EntityLinkUrl.toLowerCase() == 'null') {#
                href="javascript:smartstream.showDetailWindow('smartstream','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','','')">
                #}else{#
                    href="javascript:smartstream.showDetailWindowWithURL('smartstream','#:data.EntityLinkUrl#','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','#:data.CreatedDate#','')">
                #}#
             #:data.NotificationTitle#</a>
            </p>
            </div>

            <div class="ss_entity" id="ss_max_btn_text_#:data.NotificationId#">
                <p style="margin-bottom: 8px;">
					 <a id="ss_max_btn_title_#:data.NotificationId#" title="#:data.NotificationText#"
					#if (!data.IsdetailPageLink || !data.EntityLinkUrl || data.EntityLinkUrl.toLowerCase() == 'null') {#
					href="javascript:smartstream.showDetailWindow('smartstream','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','','')">
					#}else{#
						href="javascript:smartstream.showDetailWindowWithURL('smartstream','#:data.EntityLinkUrl#','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','#:data.CreatedDate#','')">
					#}#
				 #:data.NotificationText#</a>
                </p>
                #=data.AdditionalData#
            </div>	
			
            #var strArray = (data.Tags+'') .split(",");#
			#if (data.Tags && data.Tags.length > 0) {#
				<p class="ss_tags word-break" id="ss_max_btn_tag_#:data.NotificationId#" style="color: \#a6a6a6;margin-bottom: 8px;">
				<img src="imgs/icons/tagicon.png" class="left wp_w_10 wp_h_10 wp_mt_4 wp_mr_4">
				#for (var i = 0; i < strArray.length; i++) {#
					<span  id="ss_max_tags" class="wp_ss_hand" onclick='smartstream.onTagsClick("#:strArray[i]#")'>#:strArray[i]#</span>
					#if(i!=strArray.length-1){#
						,
					#}#
				#}#
				</p>
			#}#
           
            <div class="ss_additional">
             # for(var i = 0,_next = data.Attachments ;_next  && i < data.Attachments.length ; i++ ){ #
                <div class="at_item">
                    <a target="_blank" title="#:data.Attachments[i].Name#" onclick="FileViewer.load('#:data.Attachments[i].RefURL#','#:data.Attachments[i].Name#','#:data.Attachments[i].Type#')" >
                     #= smartstream.getAppIcon(data.Attachments[i].Type) #
                     <span>#:data.Attachments[i].Name#</span>
                     </a>
                </div>
             # } #

            # for(var i = 0,_next = data.Images ; _next && i < data.Images.length ; i++ ){ #
                <div class="at_item">
                    <a target="_blank" title="#:data.Images[i].Name#" onclick="FileViewer.load('#:data.Images[i].RefURL.split('*')[0]#','#:data.Images[i].Name#','#:data.Images[i].Type#')" >
                    <img style="height: 20px;width: 20px;" src="#:data.Images[i].RefURL.split('*')[1]#" onerror="smartstream.setDefaultIcon(this)" >
                    <span>#:data.Images[i].Name#</span>
                    </a>
                </div>
             # } #

            </div>
            <div class="ss_footer">
                <table class="left wp_h_25">
                    <tr>
                        <td class="left">
                            <img id="ss_max_from_img_#:data.NotificationId#" class="smartsteam_clickable" style="width: 15px;height: 15px;float:left;margin-right: 5px;" src="#: data.FromImageUrl #" onerror="smartstream.toSingleImg(this)"  align="middle" onclick="homepageProfileWin.user_info_win_create('#:data.FromId#')">
                        </td>
                        <td class="left" style="max-width: 120px;">
                            <p id="ss_max_from_#:data.NotificationId#" style="max-width: 135px;width: auto;" class="text-overflow smartsteam_clickable" title="#: data.FromName #" onclick="homepageProfileWin.user_info_win_create('#:data.FromId#')">#: data.FromName #</p>
                        </td>
                        <td class="left">
                            <i class="left main_calendar_x_8_3 wp_ml_10 wp_mt_5 wp_mr_10" style="margin-top: 8px;"></i>
                        </td>
                        <td class="left">
                            <img id="ss_max_to_img_#:data.NotificationId#" class="smartsteam_clickable" style="width: 15px;height: 15px;float: left;margin-right: 5px;" src="#: data.ToImageUrl #"
                            # if(data.NotificationType == 'U'){ #
                            onerror="smartstream.toSingleImg(this)"
                            # }else{#
                            onerror="smartstream.toMultiImg(this)"
                            #}#
                            # if(data.NotificationType == 'U'){ #
                            onclick="homepageProfileWin.user_info_win_create('#:data.ToId#')">
                            # }else{#
                            onclick='javascript:community_profile_controller.initProfilePage(#:data.CommunityId#);'>
                            #}#
                        </td>
                        <td class="left" style="max-width: 120px;">
                            <p id="ss_max_to_#:data.NotificationId#" style="max-width: 135px; width: auto;" class="text-overflow smartsteam_clickable" title="#: data.ToName #"
                            # if(data.NotificationType == 'U'){ #
                            onclick="homepageProfileWin.user_info_win_create('#:data.ToId#')">
                            # }else{#
                            onclick='javascript:community_profile_controller.initProfilePage(#:data.CommunityId#);'>
                            #}#
                            #: data.ToName #</p>
                        </td>
                    </tr>
                </table>
                <div class="right wp_fz_12 wp_mr_0 wp_mb_0">
					<div class="left wp_w_50">
						<span class="left wp_mt_1" data-bind="text: ss_topic_detail_modified"></span>
						<div class="right wp_mr_20">
							 #if(data.EnableDelete){#
								<i id="ss_max_btn_delete_#:data.NotificationId#" class="smartsteam_clickable main_calendar_p_10_10" title="Delete" onclick="smartstream.deleteRow({'id':'#:data.NotificationId#','type':'#:data.NotificationType#','targetId':'#:data.ToId#'})"></i>
							 #}#
						</div>
					</div>
					<div class="left wp_w_105">
						<span class="wp_dynimac_text wp_mr_20">#: Workport.utils.calDays(data.ServerDate,data.LastModifiedDate) #</span>
					</div>
					<div class="left wp_w_60">
						 <i	# if(data.IsSubscribed){ #
								class="main_calendar_t_8_8
								# if (data.EnableSocialFeature && data.EnableSocialFeature.Subscribe){#
									smartsteam_clickable
								#}#
								" title="Stop Mail Alerts"
							# }else{ #
								class="main_calendar_u_8_8
								# if (data.EnableSocialFeature && data.EnableSocialFeature.Subscribe){#
									smartsteam_clickable
								#}#
								" title="Receive Mail Alerts"
							# } #
							#var tid = data.NotificationType.toLowerCase() == 'c'?data.CommunityId:data.FromId;#
							status="#: data.IsSubscribed#"
							# if (data.EnableSocialFeature && data.EnableSocialFeature.Subscribe){#
							onclick="smartstream.subscribe(this,{'notificationId':'#:data.NotificationId#','targetId':'#:tid#','notificationType':'#:data.NotificationType#'})"
							#}#
							></i>
					</div>
					<div class="left wp_w_60">
						<span title="Reply" id="ss_max_btn_comment_#:data.NotificationId#"
						  #if (data.EnableSocialFeature && data.EnableSocialFeature.Comment) {#
							  onclick=
									#if (!data.IsdetailPageLink || !data.EntityLinkUrl || data.EntityLinkUrl.toLowerCase() == 'null') {#
										"smartstream.showDetailWindow('smartstream','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','#:data.CreatedDate#','');"
									#}else{#
										"smartstream.showDetailWindowWithURL('smartstream','#:data.EntityLinkUrl#','#:data.NotificationId#','#:data.NotificationType#','#:data.ToId#','#:data.CreatedDate#','');"
									#}#
							class = "smartsteam_clickable"
							#}#
						>
						<i class="main_smartstream_u_8_8"></i><span class="" id="smartstream_max_comment_#:data.NotificationId#" style="margin-left: 0px;" title="Reply">&nbsp;(#: data.CommentCount #)</span>
						</span>
					</div>
					<div class="left wp_w_30">
						 <i id="ss_max_btn_bookmark_#:data.NotificationId#"
                                   class="
                                #if (data.EnableSocialFeature && data.EnableSocialFeature.BookMark) {#
                                    smartsteam_clickable
                                #}#
                                #if(data.IsBookMarked){#
                                    main_smartstream_ab_8_8
                                #}else{#
                                    main_smartstream_aa_8_8
                                #}#
                                "
                                status = '#:data.IsBookMarked#'
                                #if (data.EnableSocialFeature && data.EnableSocialFeature.BookMark) {#
                                onclick="smartstream.bookmark(this,{'id': '#:data.NotificationId#', 'communityId': '#:data.ToId#','type': '#:data.NotificationType#' })"
                                #if(data.IsBookMarked){#
                                title="Unbookmark"
                                #}else{#
                                title="Bookmark"
                                #}#
                                #}#
                                ></i>
					</div>
					<div class="left wp_w_30">
					
						<i id="ss_max_btn_share_#:data.NotificationId#"  title="Share via Email"
							#if (data.EnableSocialFeature && data.EnableSocialFeature.Share) {#
								onclick = "smartstream.onShareEamilClicked('#:data.NotificationTitle#','#:data.NotificationText#');" class="smartsteam_clickable main_calendar_v_8_8"
							#} else {# 
								  class="main_calendar_v_8_8"
							#}#
							></i>
					</div>
					<div class="left wp_w_40">
						  <i id="ss_max_btn_like_#:data.NotificationId#"
                                #if(data.IsLiked){#
                                class="main_smartstream_t_8_8
                                #if (data.EnableSocialFeature && data.EnableSocialFeature.Like) {#
                                smartsteam_clickable
                                #}#
                                " title="You have Liked this"
                                #}else{#
                                class="main_smartstream_w_8_8
                                #if (data.EnableSocialFeature && data.EnableSocialFeature.Like) {#
                                smartsteam_clickable
                                #}#
                                " title="Like this"
                                #}#
                                status = '#:data.IsLiked#'
                                #if (data.EnableSocialFeature && data.EnableSocialFeature.Like) {#
                                onclick="smartstream.isliked(this,{'targetId': '#:data.ToId#', 'id': '#:data.NotificationId#', 'fromId': '#:data.FromId#', 'commentId': '', 'commentedBy': '', 'type': '#:data.NotificationType#' })"

                                #}#
                                ></i>&nbsp;<span style="margin-left: 0px;">
                    #if (data.EnableSocialFeature && data.EnableSocialFeature.Like){#
                        #if (data.LikesCount != '0' ){#
                            (<a id="ss_max_btn_like_count_#:data.NotificationId#" class="likesCount smartsteam_clickable" onclick="smartstream.onLickedCountClicked(this, '#:data.NotificationId#')">#:$.trim(data.LikesCount)#</a>)
                            #} else {#
                            (<a id="ss_max_btn_like_count_#:data.NotificationId#" class="likesCount" onclick="smartstream.onLickedCountClicked(this, '#:data.NotificationId#')">#:$.trim(data.LikesCount)#</a>)
                        #}#
                    #} else {#
                                (<a id="ss_max_btn_like_count_#:data.NotificationId#" class="likesCount">#:$.trim(data.LikesCount)#</a>)
                    #}#

                    </span>
					</div>
					
                  
                </div>
            </div>
        </div>
    </div>
    <div class="ss_row ss_line wp_mt_15 wp_mb_10" id="max_#:data.NotificationId#_line"></div>
</script>

<div id="ss_window_liked_users"></div>
<script type="text/x-kendo-template" id="ss_window_tmpl_liked_users">
    <div class="wp_w_162 wp_mt_10 wp_mb_10 wp_w_354 wp_ml_15">
        <img onclick="homepageProfileWin.user_info_win_create('#:data.UserID#')" class="left wp_w_20 wp_h_20 wp_ss_hand" src="#:data.UserImageURL#" onerror="onDefaultThumbnailWanted(this, 'U')">
        <span onclick="homepageProfileWin.user_info_win_create('#:data.UserID#')" class="wp_fz_12 wp_ml_15 wp_mt_ne1 left wp_ss_hand">#:data.UserName#</span>
        <div class="clear"></div>
    </div>
</script>


<script type="text/javascript" src="js/smartstream.main.new.js"></script>
